//
//  ZLPFirstViewCell.m
//  TangYi
//
//  Created by dllo on 15/10/27.
//  Copyright (c) 2015年 赵连鹏. All rights reserved.
//

#import "ZLPFirstViewCell.h"

@implementation ZLPFirstViewCell

- (void)dealloc {
    [_myImageView release];
    [_myLabel release];
    [_titleLabel release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createView];
    }
    return self;
}

- (void)createView {
    
    self.myImageView = [[UIImageView alloc] init];
    [self.contentView addSubview:self.myImageView];
    [_myImageView release];
    
    self.myLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.myLabel];
    [_myLabel release];
    
    self.titleLabel = [[UILabel alloc] init];
    [self.myImageView addSubview:self.titleLabel];
    [_titleLabel release];
    
}

- (void)layoutSubviews {
    [super layoutSubviews];
    self.myImageView.frame = CGRectMake(0, 0, self.contentView.frame.size.width, 150);
    self.myLabel.frame = CGRectMake(0, 150, self.contentView.frame.size.width, 120);
    self.myLabel.numberOfLines = 0;
    self.titleLabel.frame = CGRectMake(5, 120, self.contentView.frame.size.width, 20);
    self.titleLabel.textColor = [UIColor whiteColor];
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
